﻿using NB.MGJ.Common.Cache;
using NB.MGJ.Common.MVC;
using NB.MGJ.Model;
using NB.MGJ.Service;
using NB.MGJ.Service.Origins;
using NB.MGJ.Service.Product;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;

namespace NB.MGJ.Web.Controllers
{




    public class MobileController : BaseController
    {

        private OriginsNodeService _OriginsNodeService;
        private ProductService _ProdcutService;
        private ProductBatchService _ProductBatchService;

        public MobileController()
        {
            _OriginsNodeService = new OriginsNodeService();
            _ProdcutService = new ProductService();
            _ProductBatchService = new ProductBatchService();
        }

        public ActionResult TempletNodeList(int batchId)
        {
            ViewBag.batchId=batchId;
            return View();
        }

        public ActionResult AddNodeInfo(int nodeId,int batchId)
        {
            var nodeModel = _OriginsNodeService.GetModel(nodeId);
            var batchModel = _ProductBatchService.GetModelById(batchId);
            var productId = batchModel.ProductId;
            //var productModel = _ProdcutService.GetProduct(productId);

            ViewBag.nodeModel = nodeModel;
            ViewBag.batchModel = batchModel;

            return View();
        }


	}
}